package cn.zxl.spring.holiday.job.mapper;

import cn.zxl.spring.holiday.job.domain.Permission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author bofeifei
 * @since 2021-10-01
 */
@Repository
public interface PermissionMapper extends BaseMapper<Permission> {

    void saveList(List<Permission> permissions);

    List<Permission> findByRoleId(Long id);

    void saveRolAndPer(@Param("id") Long id, @Param("permissionIds") Long[] permissionIds);

    void removePermissionsByRoleId(Long rid);

    List<String> findPermissionsByEid(Long id);
}
